from enum import Enum


class ResponseCode(Enum):
    # 成功
    SUCCESS = (0, "成功")
    INVALID_ERROR = (1, "校验错误")

    # 用户
    ACCOUNT_EXISTS = (1001, "账户已存在")
    ACCOUNT_OR_PASSWORD_ERROR = (1002, "账号或密码错误")
    AUTHENTICATION_ERROR = (1003, "token认证错误")
    AUTHENTICATION_INVALID = (1004, "token已过期")
    OLDPASSWORD_ERROR = (1005, "旧密码错误")
    NEWPASSWORD_EXISTS = (1006, "新密码与原来相同")

    # 题目
    PROBLEM_COMMENT_ERROR = (2001, "评论信息错误")

    # 服务端
    INTERNAL_SERVER_ERROR = (5001, "服务器内部错误")
